﻿@model Heima8.OA.Model.WF_Temp

@{
    Layout = null;
}

<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <title>Add</title>
    <link href="~/Content/tableStyle.css" rel="stylesheet" />
    <script src="~/Scripts/jquery-1.7.1.js"></script>
    <script src="~/Scripts/jquery.unobtrusive-ajax.js"></script>

    <link href="~/Content/kindeditor-4.0.5/themes/default/default.css" rel="stylesheet" />
    <script src="~/Content/kindeditor-4.0.5/kindeditor.js"></script>
    <script src="~/Content/kindeditor-4.0.5/lang/zh_CN.js"></script>
    <script type="text/javascript">
        var editor;
        var editor1;
        KindEditor.ready(function (K) {
            editor = K.create('textarea[name="Description"]', {
                resizeType: 1,
                allowPreviewEmoticons: false,
                allowImageUpload: false,
                items: [
                    'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline',
                    'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist',
                    'insertunorderedlist', '|', 'emoticons', 'image', 'link']
            });
        });
        
        KindEditor.ready(function (K) {
            editor1 = K.create('textarea[name="TempForm"]', {
                resizeType: 1,
                allowPreviewEmoticons: false,
                allowImageUpload: false,
                items: [
                    'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline',
                    'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist',
                    'insertunorderedlist', '|', 'emoticons', 'image', 'link']
            });
        });

        
        function afetrAdd(data) {
            if (data == "ok") {
                //关闭对话框  刷新表
                window.parent.window.afterAddByChild();
            }
        }
    </script>
</head>
<body>
    @using (Ajax.BeginForm(new AjaxOptions(){OnSuccess = "afetrAdd"})) {
        @Html.ValidationSummary(true)
    
        <table>
            <tr>
                <td>@Html.LabelFor(model => model.TepName,"流程模板名：")</td><td>
                                                                            @Html.EditorFor(model => model.TepName)
                                                                            @Html.ValidationMessageFor(model => model.TepName)                                        
                                                                        </td>
            </tr>
            <tr>
                <td>@Html.LabelFor(model => model.Description,"流程描述")</td>
                <td>
                    <textarea name="Description" style="width:700px;height:80px;visibility:hidden;"></textarea>

                    @Html.ValidationMessageFor(model => model.Description)
                </td>
            </tr>
            <tr>
    
                <td class="editor-label">
                    @Html.LabelFor(model => model.TempForm,"表单模板")
                </td>
                <td class="editor-field">
              
                    <textarea name="TempForm" style="width:700px;height:80px;visibility:hidden;"></textarea>
                    @Html.ValidationMessageFor(model => model.TempForm)
                </td>
            </tr>
            <tr>
                
            <td class="editor-label">
                @Html.LabelFor(model => model.Remark,"备注")
            </td>
            <td class="editor-field">
                @Html.EditorFor(model => model.Remark)
                @Html.ValidationMessageFor(model => model.Remark)
            </td>
            </tr>
            <tr>   <td class="editor-label">
                @Html.LabelFor(model => model.ActityType,"流程类型")
            </td>
            <td class="editor-field">
                @Html.EditorFor(model => model.ActityType)
                @Html.ValidationMessageFor(model => model.ActityType)
            </td></tr>
            <tr>
                <td colspan="2">
                      <input type="submit" value="添加" />
                </td>
            </tr>
        </table>
    }
</body>
</html>
